package com.xyc.mapper.Impl;

import com.xyc.mapper.OrderMapper;
import com.xyc.pojo.Order;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

public class OrderMapperImpl extends SqlSessionDaoSupport implements OrderMapper {
    @Override
    public Order findOrderById(int order_id) {
        return getSqlSession().getMapper(OrderMapper.class).findOrderById(order_id);
    }

    @Override
    public List<Order> findOrder() {
        return getSqlSession().getMapper(OrderMapper.class).findOrder();
    }

    @Override
    public void add(int order_id) {
        getSqlSession().getMapper(OrderMapper.class).add(order_id);
    }

    @Override
    public void minus(int order_id) {
        getSqlSession().getMapper(OrderMapper.class).minus(order_id);
    }

    @Override
    public void addOrder(Order order) {
        getSqlSession().getMapper(OrderMapper.class).addOrder(order);
    }

    @Override
    public void updatePrice(int order_id) {
        getSqlSession().getMapper(OrderMapper.class).updatePrice(order_id);
    }

    @Override
    public void del(int order_id) {
        getSqlSession().getMapper(OrderMapper.class).del(order_id);
    }

    @Override
    public Integer getNum() {
        return getSqlSession().getMapper(OrderMapper.class).getNum();
    }

    @Override
    public Integer total() {
        return getSqlSession().getMapper(OrderMapper.class).total();
    }


}
